/*
 * @(#)LuceneApplication.java, 2024/2/20 15:46
 *
 * Copyright (c) 2018-2024, 四川蜀天梦图数据科技有限公司.
 * All rights reserved.
 */
package spring;

import controllers.ArticleCleaner;
import controllers.EnglishDocumentIndexFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.context.annotation.Bean;

import java.io.IOException;

/**
 * LuceneApplication
 *
 * @author fantazy
 * @version 1.0, 2024年02月20日
 */
@SpringBootApplication
public class LuceneApplication extends SpringBootServletInitializer
{
    public static void main(String[] args)
    {
        SpringApplication.run(LuceneApplication.class, args);
    }

    @Bean
    public EnglishDocumentIndexFactory documentIndexFactory() throws IOException
    {
        return new EnglishDocumentIndexFactory();
    }

    @Bean
    public ArticleCleaner articleCleaner()
    {
        return new ArticleCleaner();
    }
}
